package com.gxa.service.system.impl;

import com.gxa.mapper.ProfessionalMapper;
import com.gxa.service.system.ProfessionalService;
import com.gxa.vo.ProfessionalVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProfessionalServiceImpl implements ProfessionalService {

    @Autowired
    private ProfessionalMapper professionalMapper;

    @Override
    public List<ProfessionalVo> queryAllPro() {
        List<ProfessionalVo> professionalVos = professionalMapper.queryAllPro();
        return professionalVos;
    }

    @Override
    public List<ProfessionalVo> queryProByName(String name) {
        List<ProfessionalVo> professionalVos = professionalMapper.queryProByName(name);
        return professionalVos;
    }

    @Override
    public void addProf(ProfessionalVo professionalVo) {
        professionalMapper.addProf(professionalVo);
    }

    @Override
    public ProfessionalVo queryProfById(Integer id) {
        ProfessionalVo professionalVo = professionalMapper.queryProfById(id);
        return professionalVo;
    }

    @Override
    public void updateProf(ProfessionalVo professionalVo) {
        professionalMapper.updateProf(professionalVo);
    }

    @Override
    public void delProfById(Integer id) {
        professionalMapper.delProfById(id);
    }

    @Override
    public void updateProfStatus(Integer id, Integer status) {
        professionalMapper.updateProfStatus(id,status);
    }
}
